Skip to main content
Feedback

Version 1.0

Open Proxy Specification

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

Definitions

Media Types

Media type definitions are spread across several resources. The media type definitions SHOULD be in compliance with [RFC6838].

Some examples of possible media type definitions:

  text/plain; charset=utf-8
application/json
application/vnd.github+json
application/vnd.github.v3+json
application/vnd.github.v3.raw+json
application/vnd.github.v3.text+json
application/vnd.github.v3.html+json
application/vnd.github.v3.full+json
application/vnd.github.v3.diff
application/vnd.github.v3.patch

Specification

Versions

The Open Proxy Specification is versioned using a major.minor.patch versioning scheme. The major.minor portion of the version string (for example 3.1) SHALL designate the OPS feature set. .patch versions address errors in, or provide clarifications to, this document, not the feature set. Tooling which supports OPS 1.0 SHOULD be compatible with all OPS 1.0.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 1.1.0 and 1.1.1 for example.

Occasionally, non-backwards compatible changes may be made in minor versions of the OPS where impact is believed to be low relative to the benefit provided.

An Open Proxy document compatible with OPS 1.. contains a required version field which designates the version of the OPS that it uses.

Example

version: 1.0
api:
name: petstore
version: 2.1
displayName: Petstore # optional
description: a simple petstore api # optional
type: REST
backend:
url: https://internal.petstore.com
gateway:
protocol: https
path: /petstore
documentation: # optional
url: https://somewhere.com/openapi

Documentation

Root

NameTypeRequiredDescription
versionStringyesVersion of Open Proxy Spec definition used by this file. Must be “1.0”.
apiApiyesbasic information about this API
backendBackendyesInfo about the backend to which requests should be forwarded by the gateway
gatewayGatewayyesInfo on how and where the API is accessible in the gateway
documentationDocumentationnoInfo on where to get documentation (OpenAPI file). Only required for external OpenAPI files, not if file is present in the same repository.

API

NameTypeRequiredDescription
nameStringyesTechnical name of this API.
versionStringyesAPI version.
displayNameStringnoHuman readable name for the API.
descriptionStringnoHuman readable description of the API.
typeStringyesAPI Type. Currently, this must be “REST”.

Backend

NameTypeRequiredDescription
urlStringyesThe url of the backend to which API requests will be forwarded.

Gateway

NameTypeRequiredDescription
protocolStringyesProtocol that has to be used when calling the API through the gateway. Must be “http” or “https”.
pathStringyesContext path at which the API is located in the gateway. Will be appended to gateway base url. Must start with a '/'. Not supported by all gateways.

Documentation

NameTypeRequiredDescription
urlStringyesExternal url of OpenAPI document for this API.
On this Page